Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Also inspect doc block comments #10783

Closed
wants to merge 2 commits into from

Conversation

blyxyas
Copy link
Member

@blyxyas blyxyas commented May 15, 2023

The system that checked for certain things in Documentation, wouldn't work with code blocks (with only one *). This PR fixes that.

More info in the linked issue.
Fixes #10277

changelog: Fix lints that were silenced because of the use of /** ...*/ instead of ///

@rustbot
Copy link
Collaborator

rustbot commented May 15, 2023

r? @Alexendoo

(rustbot has picked a reviewer for you, use r? to override)

@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties label May 15, 2023
@Alexendoo
Copy link
Member

This is bypassing the markdown parsing which I'm not super keen on, without fixing the root of the problem we'd still have similar issues for any other doc based lint, e.g. for missing_safety_doc

@blyxyas
Copy link
Member Author

blyxyas commented May 20, 2023

Sorry for the wait. I was in Portugal without access to a computer.
I'm going to fix this right now.

@bors
Copy link
Collaborator

bors commented Jun 16, 2023

☔ The latest upstream changes (presumably #10953) made this pull request unmergeable. Please resolve the merge conflicts.

@blyxyas blyxyas force-pushed the fix-silent_codeblocks branch 3 times, most recently from f5b164c to 4ca46f4 Compare June 17, 2023 08:16
@bors
Copy link
Collaborator

bors commented Jun 17, 2023

☔ The latest upstream changes (presumably #10976) made this pull request unmergeable. Please resolve the merge conflicts.

@blyxyas
Copy link
Member Author

blyxyas commented Aug 8, 2023

Is there something more to change in this PR?

@Alexendoo
Copy link
Member

I had the thought that it wouldn't account for spans on the other lints e.g. doc_markdown but didn't get around to testing it, if you could check that/add a test for it that'd be good

@blyxyas
Copy link
Member Author

blyxyas commented Aug 11, 2023

I forgot to actually add the #[warn] attribute to test it 💀

I'll add it soon

@blyxyas
Copy link
Member Author

blyxyas commented Aug 11, 2023

Just tested it. It does indeed bug the spans on doc_markdown. I'll prepare a fix

@blyxyas
Copy link
Member Author

blyxyas commented Aug 11, 2023

Fixed =)

@Alexendoo
Copy link
Member

It doesn't seem to work with

#![warn(clippy::doc_markdown)]

pub mod a {
    /**
    StructName
    */
    pub fn f() {}
}

@blyxyas
Copy link
Member Author

blyxyas commented Aug 18, 2023

Almost 100 days now, I'll change the approach as this isn't working.

@blyxyas
Copy link
Member Author

blyxyas commented Aug 19, 2023

I'll have to close this, sadly I don't have the time to research this issue further, I'll leave it free for someone else that has the time to fix it.

@blyxyas blyxyas closed this Aug 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-review Status: Awaiting review from the assignee but also interested parties
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Clippy treats /**…*/ doc comments differently from ///… doc comments
4 participants